local blacklistName = KEYS[1]
local sourceIp = KEYS[2]

redis.call("DEL", blacklistName .. sourceIp)

local keys = redis.call('keys', blacklistName .. ':' .. sourceIp .. '*')
if table.getn(keys) > 0 then
    redis.call('DEL', unpack(keys))
end

return 1
